#ifndef HTTP_CLIENT_H
#define HTTP_CLIENT_H

#include <QThread>
#include <QStringList>
#include <QStandardItemModel>
#include <QMetaType>
#include <QDate>
#include <QString>
#include <QTime>
#include <QTimer>
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkRequest>
#include <QHttpMultiPart>
#include <QTimer>
#include "hNetworkReply.h"
#include "com/log.h"

#define SUCCESS 0
#define FAIL -1
class HNetworkReply;
class HTTP_Handler : public QObject
{
    Q_OBJECT
public:
    HTTP_Handler();
    ~HTTP_Handler();
    void http_timerStart(QString url);
    void http_timerStop(QString url);
public slots:
    void http_Post_Sender(bool https,QString ip,QString url,int port,QJsonObject postData);
public: signals:
    void http_replySignal(QString url,QJsonDocument rspData);
private :
    QNetworkAccessManager httpRecver;
};

class HTTPCliet : public QThread
{
    Q_OBJECT
public:
    HTTPCliet();
    ~HTTPCliet();
    void run();             //用于启动线程
public:
    HTTP_Handler *httpHandler;
};

#endif // HECP_SERVER_H

